package auth.service;

import common.model.user.User;
import common.dto.userdto.UserDTO;
import common.model.result.Result;

public interface IUserService {
    
    // 根据手机号查询用户
    User findByPhone(String phone);
    
    // 创建新用户
    void createUser(User user);
    // 更新用户
    Result updateUser(UserDTO userDTO);
    //修改密码
    void updatePassword(String password, String phone);
    
    /**
     * 验证密码
     * @param plainPassword 明文密码
     * @param encryptedPassword 加密后的密码
     * @return 是否匹配
     */
    boolean verifyPassword(String plainPassword, String encryptedPassword);

    Result getUserList();

    Result getUserDetail(Long id);

    Result getUserDashboard(Long uid);

    Result getUserListForCart();

    Result jiangUpdateUser(User user);

    Result jiangDeleteUser(Long id);

    Result getOnlinAdminId();
}
